#include "etcd.hpp"
#include <gflags/gflags.h>
#include <thread>
DEFINE_bool(run_mode,false,"程序的运行模式,格式:true:发布模式/false:调试模式");
DEFINE_string(log_filename,"","发布模式下使用的文件名");
DEFINE_int32(log_level,0,"发布模式下设置的日志输出等级");
DEFINE_string(base_sevice,"/service","服务监控根目录");
DEFINE_string(etcd_host,"http://127.0.0.1:2379","服务注册中心地址");
DEFINE_string(instance_name,"/friend/instance","当前实例名称");
int main(int argc , char* argv[])
{
    google::ParseCommandLineFlags(&argc,&argv,true);
    init_logger(FLAGS_run_mode,FLAGS_log_filename,FLAGS_log_level);
    std::shared_ptr<Registrant> client_ptr = std::make_shared<Registrant>(FLAGS_etcd_host);
    client_ptr->registery(FLAGS_base_sevice + FLAGS_instance_name , FLAGS_etcd_host);
    return 0;
}